// 用于验证  token  的中间件

const jwt = require('../utils/jwt')

module.exports = async (ctx, next) => {
  let user = await jwt.verifyToken(ctx)
  ctx.user = user
  // console.log('user',ctx.user);
  await next()
  // if (user) next()
}
